package com.example.casper.Experiment2024.Database;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

@Dao
public interface PunchRecordDao {
    @Insert
    void insert(PunchRecord record);

    @Query("SELECT * FROM punch_record")
    List<PunchRecord>  getAll();

    @Query("SELECT * FROM punch_record WHERE id = :id")
    PunchRecord getById(long id);
    @Delete
    void delete(PunchRecord record);  // 确保有这个方法

    @Update
    void update(PunchRecord record);
}